-- GENERATED SPELL FOR [Shadowmoon Acolyte] --


function spell0_16594(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(15587,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16594', 1500, 1)
end

function spell1_16594(pUnit, Event) --@Mind Blast,n/a--
pUnit:FullCastSpellOnTarget(31516,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16594', 2500, 1)
end

function spell2_16594(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(35944,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16594', 30276, 1)
end

function spell3_16594(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(36052,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16594', 30288, 1)
end

function spell4_16594(pUnit, Event) --@Prayer of Healing,Self--
pUnit:FullCastSpellOnTarget(15585,pUnit)
pUnit:RegisterEvent('Sorts_16594', 3000, 1)
end

function spell5_16594(pUnit, Event) --@Prayer of Healing,Self--
pUnit:FullCastSpellOnTarget(35943,pUnit)
pUnit:RegisterEvent('Sorts_16594', 3000, 1)
end

function spell6_16594(pUnit, Event) --@Resist Shadow,n/a--
pUnit:FullCastSpellOnTarget(30479,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16594', 0, 1)
end

function Sorts_16594(pUnit, Event)
local choix_sorts_16594 = math.random(0, 6)
if choix_sorts_16594 == 0 then
pUnit:RegisterEvent('spell0_16594', 1, 1)
end
if choix_sorts_16594 == 1 then
pUnit:RegisterEvent('spell1_16594', 1, 1)
end
if choix_sorts_16594 == 2 then
pUnit:RegisterEvent('spell2_16594', 1, 1)
end
if choix_sorts_16594 == 3 then
pUnit:RegisterEvent('spell3_16594', 1, 1)
end
if choix_sorts_16594 == 4 then
pUnit:RegisterEvent('spell4_16594', 1, 1)
end
if choix_sorts_16594 == 5 then
pUnit:RegisterEvent('spell5_16594', 1, 1)
end
if choix_sorts_16594 == 6 then
pUnit:RegisterEvent('spell6_16594', 1, 1)
end
end

function mob16594_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16594', math.random(1500, 3000), 1)
end

function mob16594_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16594_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16594_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16594, 1, 'mob16594_Action')
RegisterUnitEvent(16594, 2, 'mob16594_Leave')
RegisterUnitEvent(16594, 3, 'mob16594_Kill')
RegisterUnitEvent(16594, 4, 'mob16594_Die')
